package controllers

import (
	beego "github.com/beego/beego/v2/server/web"
	"quickstart/common"
)

type MainController struct {
	beego.Controller
	common.ReturnController
}

func (c *MainController) Get() {

	c.Data["Website"] = "beego.vip"
	c.Data["Email"] = "astaxie@gmail.com"
	c.TplName = "index.tpl"
}
func (c *MainController) getUser() {
	data := c.Ctx.Input.Context.Request.Form
	if _, ok := data["ids"]; !ok {
		c.ErrorJson(400, "缺少参数！", "data自定义数据")
	}
	c.SuccessJson("请求成功！", "data自定义数据")

}
